<template>
  <el-dialog :visible.sync="dialogVisible" width="30%" :show-close="false">
    <template slot="title">
      <span>提示</span>
    </template>
    <el-form label-width="80px" :model="formLabelAlign">
      <el-form-item label="名称">
        <el-input v-model="formLabelAlign.name"></el-input>
      </el-form-item>
    </el-form>
    <span slot="footer" class="dialog-footer">
      <el-button @click="close">取 消</el-button>
      <el-button type="primary" @click="ok">确 定</el-button>
    </span>
  </el-dialog>
</template>

<script>
export default {
  props: {
    dialogVisible: {
      type: Boolean,
      default: false,
    },
  },
  data() {
    return {
      formLabelAlign: {
        name: "",
      },
    };
  },
  methods: {
    close() {
      this.$emit("goDialogFn", false);
    },
    ok() {
      this.$emit("insertFn", this.formLabelAlign);
      this.close();
    },
  },
};
</script>

<style lang='scss' scoped>
::v-deep .el-dialog__header {
  padding: 0px;
}
</style>
